<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:clickframes="http://" xml:lang="en" lang="en">
<head>
    <title>Entity Usage - ${appspec.title}</title>
	<link rel="stylesheet" type="text/css" href="css/reset-fonts-sans.css" />
	<link rel="stylesheet" type="text/css" href="css/grid-12-fluid.css" />
    <link rel="stylesheet" type="text/css" href="css/style-entities.css" />
    <style type="text/css" media="screen">
        body {
            margin:2em;
        }
        
        .entity-page {
            margin-bottom:6em;
        }
        
        .toc {
            background:#eeeeee;
            padding-top:2em;
            padding-bottom:2em;
        }
        
        .page-space {
            display:none;
        }
    </style>
</head>
<body>

<div class="container_12 entity-page toc">
    
    <div class="prefix_1 grid_11 toc_title">
        <h2>${appspec.title}</h2>
        <h1>Entity Usage</h1>
        <h3>8 April 2010</h3>
        <h4>Generated by Clickframes</h4>
    </div>
    <div class="clear"></div>
    
#foreach($entity in $appspec.entities)
    <div class="grid_1 toc_page">${velocityCount}</div>
#if ($entity.referringOutputs.size() > 0 || $entity.referringOutputLists.size() >  0)
    <div class="grid_11 toc_description"><a href="#${entity.id}">${entity.title}</a></div>
#else
    <div class="grid_11 toc_description">${entity.title}</div>
#end
    <div class="clear"></div>
#end
    
</div>
<div class="page-space">&nbsp;</div>

#foreach($entity in $appspec.entities)
#if ($entity.referringOutputs.size() > 0 || $entity.referringOutputLists.size() >  0)
<div class="container_12 entity-page">

    <div class="grid_2 page-number">
        <a name="${entity.id}">${velocityCount}</a>
    </div>
    <div class="grid_10 header">
        <h1>${entity.title}</h1>
    </div>
    <div class="clear"></div>

#if ($entity.referringOutputs.size() > 0)
    <h3 class="prefix_2 grid_10">Outputs</h3>
#foreach ($output in $entity.referringOutputs)
    <div class="prefix_2 grid_3">
        ${output.id}
    </div>
    <div class="grid_7">
        <p class="entity-description"><strong>${output.title}:</strong> ${output.description}</p>
#if ($output.facts)
        <ul>
#foreach ($fact in $output.facts)
            <li>${fact.description}</li>
#end
        </ul>
#end
    </div>
    <div class="clear"></div>
#end
#end

#if ($entity.referringOutputLists.size() > 0)
    <h3 class="prefix_2 grid_10">Output Lists</h3>
#foreach ($outputList in $entity.referringOutputLists)
    <div class="prefix_2 grid_3">
        ${outputList.id}
    </div>
    <div class="grid_7">
        <p class="entity-description"><strong>${outputList.title}:</strong> ${outputList.description}</p>
#if ($outputList.facts)
        <ul>
#foreach ($fact in $outputList.facts)
            <li>${fact.description}</li>
#end
        </ul>
#end
    </div>
    <div class="clear"></div>
#end
#end

</div>
<div class="clear"></div>
<div class="page-space">&nbsp;</div>
#end
#end

</body>
</html>